The present invention relates to a method and apparatus for controlling a servo actuator such as an electric motor using a proportional-integral compensator. More specifically, the invention relates to a method and apparatus for controlling a servo actuator using a clipping limiter to precisely control the actuator even when the compensator and/or actuator is operating in saturation. The invention is also applicable to process control.
A classic problem encountered in digital servo loop systems involves dealing with saturation effects. Saturation occurs when the output of a compensator or actuator (i.e., the "system") reaches it most extreme value. When this happens, the device normally is no longer operating in a linear condition.
In real implementations, there is a strong economic incentive to use the smallest actuator possible to accomplish a particular task, since the larger the actuator is, the more costly it becomes. There is also a strong economic incentive to perform a task as quickly as possible, and this usually means operating the actuator at or near its physical limits, i.e., in saturation or nearly in saturation.
Classical system theory does not model saturation effects very well, since a saturation condition is a non-linear condition, and classical system theory only works well modeling linear systems. Therefore, classical system theory does not offer much other than the implicit assumption that the system being analyzed must be linear or the predicted performance will not be achieved.
Conventional proportional-integral (PI) compensators are used in forward paths of many feedback control systems. These compensators are driven by an error signal computed from the difference between a reference (setpoint) and a measured value. The output of the compensator drives an actuator, which affects the measured value.
The compensator uses two terms: 1) A "Proportional to Error" term, and 2) an "Integral of Error" term. Both of these terms typically have scaling constants, or gains, associated with them, but these scaling constants will be neglected from further discussion herein, without any loss of generality. The classic PI equation can be expressed as: EQU Output=Error+Integral(Error) (1),
or, in the frequency domain: EQU Y(s)=X(s) /s=X(s) * (s+1)/s (2).
The above equation (2) yields a pole at the origin and a finite zero (at s =-1).
The problem of saturation typically occurs when the "Error" term is large enough to drive an actuator to its physical limit. It is meaningless to drive the output beyond the range which the actuator can manage. When in saturation, the system is non-linear and the feedback loop for controlling the actuator is no longer closed.
Many conventional compensators, however, behave as if the feedback loop was still closed and thus continue to attempt to drive the output to even higher values, since the output is proportional to the error (as seen in the above Equation 1). The linear system theory upon which the compensator design is based no longer applies during the saturation condition, and the behavior of the system begins to deviate from that of the implicit system model the compensator was designed to operate within. This saturation condition persists until the error is reduced sufficiently enough to bring the actuator out of saturation and thereby re-close the feedback loop.
As is known to those of ordinary skill in the art, "Integral Windup" occurs when the output of the actuator is saturated. Integral Windup occurs when the integrator that computes the "Integral of Error" term continues to integrate (i.e., "wind") and attempts to drive the output to even higher values during the period when the actuator is saturated.
When the error term diminishes and the feedback loop re-closes, the Integral of Error term must be "unwound" by having a negative error integrated for an amount of time sufficient to bring the actuator out of saturation. This leads to two undesirable effects: 1) the output "sticks" at the saturated output value for an excessive length of time even though the error has diminished, and 2) the system is forced to deviate from the desired output value until the integrator is "unwound."
In systems with small actuators or high speed response requirements, the performance of the system can become unstable, with the output alternating between saturation at one extreme or the other. Settling time is also greatly extended, thereby leading to a system with poor servo characteristics.
The conventional approach to the saturation problem is to "clamp" the outputs at the saturation limit (or limits) of the actuator. Since the Proportional to Error term of Equation (1) has no history (or memory) associated with it, this method is adequate. The Integral of Error term of Equation (1) which has a history associated with it is then over-ridden, and a value is back-calculated by subtracting the Proportional to Error term from the saturation output level. This appears to prevent "windup" in the integrator, since as the error diminishes to a level sufficient to bring the actuator out of saturation, the output immediately starts dropping.
This conventional approach of "resetting" the integrator has a few problems associated with it, however. First, the integrator is meant to be a long term memory for the compensator. The integrator indicates where the compensator has been, and is intended to cause slow changes on the output of the compensator, to thereby adjust to slowly changing sources of fixed error. By resetting the integrator, "jumps" are caused in the output of the compensator, which is an undesirable condition. Even though these jumps are somewhat masked by the clamps (or limits) on the output of the integrator, they are still noticeable.
Second, when the system operates in the presence of noise just below the saturation limit, or at any time there is noise or a setpoint change sufficient to drive the actuator momentarily into saturation, the integrator is "reset" under the conventional approach, and the output "jumps." This effect leads to noisy, "thrashing" behavior of the servo loop.
Third, calculating the proper value for the integrator to keep the system at the edge of saturation is a non-trivial task. This task becomes substantially more difficult than the ordinary calculation performed when the feedback loop is closed and the system is operating in a linear condition.
Still another problem not addressed by the conventional approach is rate limiting required by the actuator. Most actuators cannot be slewed at an infinite rate, yet this is exactly what is commanded whenever a setpoint change or noise spike enters the system to drive the actuator into saturation.
In view of these problems, it would be desirable to have an integrator that stops integrating and holds its value whenever the actuator is driven into saturation, whether this is for the proportional to error (magnitude of error) term or for the integral of error (rate of error) term. It would also be desirable to set the integrator limits in terms of the known output saturation limits and not have to back-calculate the integral or error term. Still further, it would be desirable to express the rate limits in terms of the output limits of the actuator. Even still further, it would be desirable to have the compensator calculation be identical whether the feedback loop is open or closed. Lastly, it would be desirable to not have any "windup" effects in the feedback loop.